﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace bzxxxt.model
{
    public class ImportModel
    {
        public int id { get; set; }

        public int graveId { get; set; }
        public string cun { get; set; }
        public string zu{get;set;}
        public string rname { get; set; }
        public string rtel { get; set; }
        public string rsex { get; set; }
        public string rcardno { get; set; }

        public string relation { get; set; }
        public int? importId { get; set; }
        public string dname { get; set; }
        public string dsex { get; set; }
        public string dcardno { get; set; }
        public string storeType { get; set; }

        public string oldgrave { get; set; }
        public int gtype { get; set; }
        public int qty { get; set; }
        public DateTime? regTime { get; set; }
        public DateTime? storeTime { get; set; }

        public DateTime fireTime { get; set; }


        public string pname { get; set; }
        public string pcode { get; set; }
        public int dong { get; set; }
        public int floor { get; set; }
        //public int section { get; set; }
        public String SectionStr{
            get;
            set;
        }
        //public int line { get; set; }
        public string LineStr { get; set; }
        public int layer { get; set; }
        public int col { get; set; }

        public string location { 
            get{
                string loc = string.Format("{0}{1:0}{2:0}{3}{4}{5:00}{6:000}{7}", 
                    pcode, dong, floor, SectionStr.Substring(SectionStr.Length-2), LineStr.Substring(LineStr.Length-2), 
                    layer, col,Convert.ToChar('A'+gtype-1));                             
                return loc;
            } 
        }
    }
}